package com.stepbystep.thread.blockingqueue;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;

public class BlockingQueanTest {
	public static void main(String[] args) {
		LinkedBlockingQueue<String> queue=new LinkedBlockingQueue<String>(1);
		Geter geter=new Geter(queue);
		Writer writer=new Writer(queue);
		ExecutorService executorService=Executors.newCachedThreadPool();
		executorService.execute(geter);
		executorService.execute(writer);
		
	}
	
}
